<?php
/**
  站点设置模块，引导用户设置站点
**/
class SitestepAction extends IntesysAction {
	public function step1(){
		//第一步，设置站点名称、行业、公司职员人数
		if(isset($_POST['title'])){
			$db = M('Site');
			$data['title'] = $_POST['title'];
			$data['sitecategory_id'] = $_POST['sitecategory_id'];
			$ret = $db -> where(array('id' => __SITEID__)) -> data($data) -> save();
			if($ret !== false){
				$db-> where(array('id' => __SITEID__)) -> save(array('step' => 1));
				$this->success('保存成功！');
			}else{
				$this->error($db -> getError());
			}
		}else{
			//查询行业
			$this->cate_list=D('Sitecategory')->getListToArray1(0);
			$this->display();
		}
	}
}